import request from '@/utils/request'

// 创建设备检查项
export function createInspectionPlanEntry(data) {
  return request({
    url: '/device/inspection-plan-entry/create',
    method: 'post',
    data: data
  })
}

// 更新设备检查项
export function updateInspectionPlanEntry(data) {
  return request({
    url: '/device/inspection-plan-entry/update',
    method: 'put',
    data: data
  })
}

// 删除设备检查项
export function deleteInspectionPlanEntry(id,flag) {
  return request({
    url: '/device/inspection-plan-entry/delete?id=' + id+'&flag='+flag,
    method: 'delete'
  })
}

// 获得设备检查项
export function getInspectionPlanEntry(id) {
  return request({
    url: '/device/inspection-plan-entry/get?id=' + id,
    method: 'get'
  })
}

// 获得设备检查项分页
export function getInspectionPlanEntryPage(query) {
  return request({
    url: '/device/inspection-plan-entry/page',
    method: 'get',
    params: query
  })
}

// 获得设备未选择检查项分页
export function getInspectionPlanEntryNotSelectPage(query) {
  return request({
    url: '/device/inspection-plan-entry/not-select-page',
    method: 'get',
    params: query
  })
}

// 导出设备检查项 Excel
export function exportInspectionPlanEntryExcel(query) {
  return request({
    url: '/device/inspection-plan-entry/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
